package com.learning.mybatis.principle.sqlsession.mapperproxy.service.impl;

import java.util.ArrayList;
import java.util.List;

/**
 * ClassName:
 * Description: 代码非常简陋，只是为了说明问题
 * -Xmx5m -Xms5m  -XX:+HeapDumpOnOutOfMemoryError   -XX:+PrintGCDateStamps -XX:+PrintGCDetails -Xloggc:gc.log
 * Date: 2020/8/12 20:18 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
public class HeapOOMDemo {

    private static List<String> strList = new ArrayList<>();

    public static void main(String[] args) {
        int count = 100000;
        String str1 = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890";
        for (int i = 0; i < count; i++) {
            strList.add(str1 + "i" + i);
        }
        System.out.println("done");
    }
}
